package com.ddpt.permission.controller;

import com.lh.center.permission.api.bo.ImgCodeBean;
import com.lh.center.permission.util.ImageCodeUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 验证码相关
 */
@RestController
@RequestMapping("/api/permission/verification")
public class VerificationCodeController {

    @Resource
    private ImageCodeUtil imageCodeUtil;

    /**
     * 发送图片验证码
     */
    @PostMapping("/sendImageCode")
    public ImgCodeBean sendImageCode(){
        return imageCodeUtil.getImgCode();
    }
}
